﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ContractorTimesheet.DataModel;

namespace ContractorTimesheet.Models
{
    public class ResetPasswordModel
    {
        public ResetPasswordModel()
        {
            ResetInfo = new List<ResetInfo>();
        }

        public List<ResetInfo> ResetInfo { get; set; }
    }

    public class ResetInfo
    {
        public int Id { get; set; }

        public string Firstname { get; set; }

        public string Lastname { get; set; }

        public string Message { get; set; }

        public static IList<ResetInfo> CreateResetInfo(IList<User> users)
        {
            IList<ResetInfo> resetInfoList = new List<ResetInfo>();

            foreach (User user in users)
            {
                ResetInfo resetInfo = new ResetInfo
                {
                    Id = user.Id,
                    Firstname = user.Firstname,
                    Lastname = user.Lastname,
                };

                resetInfoList.Add(resetInfo);
            }

            return resetInfoList;
        }
    }
}